import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class AboutUs extends StatefulWidget {
  final String content;

  AboutUs(this.content);

  @override
  State<StatefulWidget> createState() {
    return AboutUsState();
  }
}

class AboutUsState extends State<AboutUs>{
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        brightness: Brightness.light,
        title: Text('关于我们',
          style: TextStyle(
            fontFamily: 'PingFangSC-Medium',
            fontSize: ScreenUtil().setSp(16),
            fontWeight: FontWeight.w600,
            color: Color.fromRGBO(51, 51, 51, 1),
            height: 1,
          ),
        ),
        backgroundColor: Colors.white,
        centerTitle: true,
        leading: FlatButton(
          child: Icon(
            Icons.arrow_back_ios,
            size: ScreenUtil().setSp(16),
            color: Color.fromRGBO(51, 51, 51, 1),
          ),
          onPressed: () {
            Navigator.pop(context);
          },
        ),
      ),
      body: SingleChildScrollView(
        child: Container(
          width: MediaQuery.of(context).size.width,
          padding: EdgeInsets.only(
            left: ScreenUtil().setWidth(19.5),
            right: ScreenUtil().setWidth(19.5),
            top: ScreenUtil().setHeight(25),
          ),
          decoration: BoxDecoration(
            border: Border(
              top: BorderSide(
                color: Color.fromRGBO(248, 248, 248, 1),
                width: ScreenUtil().setHeight(7.5),
              ),
            ),
          ),
          child: Text(
            widget.content,
            style: TextStyle(
              fontFamily: 'PingFangSC-Light',
              fontSize: ScreenUtil().setSp(14),
              fontWeight: FontWeight.w300,
              color: Color.fromRGBO(51, 51, 51, 1),
              height: 1.85,
            ),
            textAlign: TextAlign.justify,
          ),
        ),
      ),
    );
  }
}